package com.daniel.cms.utils;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

/**
 * 详细说明
 *
 * @author Daniel
 * @version V1.0
 * @date 2020/4/23 15:07
 */
public class I2bSerializer extends JsonSerializer<Integer> {
	@Override
	public void serialize(Integer str, JsonGenerator jsonGenerator, SerializerProvider serializerProvider)
			throws IOException {
		jsonGenerator.writeBoolean(str == 1);
	}

}